package com.durablemethods.futures.client;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.VerticalPanel;

public class NHLBlockTradeConfirmation extends DialogBox {
	
	

	public NHLBlockTradeConfirmation(NHLTradeEntryDto dto) {
	
		
		VerticalPanel maiPanel = new VerticalPanel();
		String buyLabelString = new StringBuffer().append(dto.getBuyer().getAlias()).append(" BUYS").toString();
		String sellLabelString = new StringBuffer().append(dto.getSeller().getAlias()).append(" SELLS").toString();
		String summary = new StringBuffer().append(dto.getShares().toString()).append(" @ $").append(dto.getPrice().toString()).toString();
		maiPanel.add(new Label(buyLabelString));
		maiPanel.add(new Label(sellLabelString));
		maiPanel.add(new Label(summary));
		maiPanel.add(new Button("Close", new CloseDialog(this)));
		add(maiPanel);
		this.setAnimationEnabled(true);
		this.setVisible(true);		
	}

}
